﻿using DocumentFormat.OpenXml.Lite.DrawingML.Geometry.Properties;
using DocumentFormat.OpenXml.Lite.DrawingML.Types;
using DocumentFormat.OpenXml.Lite.Shared;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.DrawingML.Chart.Elements
{
    [XmlRoot("errBars", Namespace = Constants.Chart)]
    public class ErrorBars : XmlSerializable
    {
        [Optional]
        [XmlElement("errDir", Namespace = Constants.Chart)]
        public RequiredValue<ST_ErrDir> Direction { get; set; }

        [XmlElement("errBarType", Namespace = Constants.Chart)]
        public NullableValue<ST_ErrBarType> BarType { get; set; }

        [XmlElement("errValType", Namespace = Constants.Chart)]
        public NullableValue<ST_ErrValType> ValueType { get; set; }

        [Optional]
        [XmlElement("noEndCap", Namespace = Constants.Chart)]
        public NullableValue<bool> NoEndCap { get; set; }

        [Optional]
        [XmlElement("plus", Namespace = Constants.Chart)]
        public Value Plus { get; set; }

        [Optional]
        [XmlElement("minus", Namespace = Constants.Chart)]
        public Value Minus { get; set; }

        [Optional]
        [XmlElement("val", Namespace = Constants.Chart)]
        public RequiredValue<double> Value { get; set; }

        [Optional]
        [XmlElement("spPr", Namespace = Constants.Chart)]
        public ShapeProperties ShapeProperties { get; set; }

        [Optional]
        [XmlElement("extLst", Namespace = Constants.Chart)]
        public ExtensionList ExtensionList { get; set; }

        public ErrorBars() { }
    }
}
